package com.taoding.springbootbase.base.service;

import com.taoding.springbootbase.base.entity.User;
import com.taoding.springbootbase.base.model.UserSession;

/**
 * 用户登录session服务类
 * @author wuwentan
 * @date 2018/8/17
 */
public interface SessionService {

    boolean checkIsValid(String key);

    UserSession newUserSession(User user);

    void saveUserSession(UserSession userSession);

    void refreshUserSession(User user);

    UserSession getUserSessionById(String sessionId);

    UserSession getUserSessionByUserId(String userId);

    void removeUserSession(String userId);
}
